Class SomeSimpleMethods

java.lang.Object
  extended by SomeSimpleMethods

public class SomeSimpleMethods
extends java.lang.Object

SomeSimpleMethods: Demonstrates various styles of methods and method calls

Version:
1.0 Module: Methods Course: ADEV-1000 Section: 1-? Date Created: 05.01.2012 Last Updated: 05.23.2012 Change log: (mm.dd.yyyy) – Change Description
Author:
Tara Brown

Constructor Summary
SomeSimpleMethods()
           
 
Method Summary
static void main(java.lang.String[] arg)
           
static int rollDice(int numberOfSides)
          This method simulates the rolling of one die by randomly generating an integer between 1 and the size of the die.
static void showRoll(int sidesOnDie)
          This method creates a simple graphic effect whenever a die is rolled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SomeSimpleMethods

public SomeSimpleMethods()
Method Detail

main

public static void main(java.lang.String[] arg)

rollDice

public static int rollDice(int numberOfSides)
This method simulates the rolling of one die by randomly generating an integer between 1 and the size of the die.

Parameters:
numberOfSides - The number of sides on the die to be rolled
Returns:
The result of rolling the dice. A randomly generated integer between 1 and the size of the die.

showRoll

public static void showRoll(int sidesOnDie)
This method creates a simple graphic effect whenever a die is rolled. The number of *'s displayed corresponds to the size of the die being rolled.

Parameters:
sidesOnDie - The number of sides on the die to be rolled